home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1569 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 62 6c | 61 63 6b 2e 77 65 65 67 |Path: bl|ack.weeg|
|00000010| 2e 75 69 6f 77 61 2e 65 | 64 75 21 72 6f 62 69 6e |.uiowa.e|du!robin|
|00000020| 73 6f 6e 0a 46 72 6f 6d | 3a 20 54 68 65 20 41 6d |son.From|: The Am|
|00000030| 6f 72 70 68 6f 75 73 20 | 4d 61 73 73 20 3c 72 6f |orphous |Mass <ro|
|00000040| 62 69 6e 73 6f 6e 40 62 | 6c 75 65 2e 77 65 65 67 |binson@b|lue.weeg|
|00000050| 2e 75 69 6f 77 61 2e 65 | 64 75 3e 0a 4e 65 77 73 |.uiowa.e|du>.News|
|00000060| 67 72 6f 75 70 73 3a 20 | 63 6f 6d 70 2e 6c 61 6e |groups: |comp.lan|
|00000070| 67 2e 63 0a 53 75 62 6a | 65 63 74 3a 20 52 65 3a |g.c.Subj|ect: Re:|
|00000080| 20 69 73 20 74 68 69 73 | 20 73 74 72 69 6e 67 20 | is this| string |
|00000090| 61 20 6e 75 6d 62 65 72 | 3f 0a 44 61 74 65 3a 20 |a number|?.Date: |
|000000a0| 53 75 6e 2c 20 31 34 20 | 4a 61 6e 20 31 39 39 36 |Sun, 14 |Jan 1996|
|000000b0| 20 32 31 3a 30 30 3a 33 | 38 20 2d 30 36 30 30 0a | 21:00:3|8 -0600.|
|000000c0| 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 3a 20 55 6e |Organiza|tion: Un|
|000000d0| 69 76 65 72 73 69 74 79 | 20 6f 66 20 49 6f 77 61 |iversity| of Iowa|
|000000e0| 2c 20 49 6f 77 61 20 43 | 69 74 79 2c 20 49 41 2c |, Iowa C|ity, IA,|
|000000f0| 20 55 53 41 0a 44 69 73 | 74 72 69 62 75 74 69 6f | USA.Dis|tributio|
|00000100| 6e 3a 20 77 6f 72 6c 64 | 0a 4d 65 73 73 61 67 65 |n: world|.Message|
|00000110| 2d 49 44 3a 20 3c 50 69 | 6e 65 2e 41 33 32 2e 33 |-ID: <Pi|ne.A32.3|
|00000120| 2e 39 31 2e 39 36 30 31 | 31 34 32 30 35 36 30 32 |.91.9601|14205602|
|00000130| 2e 35 39 30 35 31 45 2d | 31 30 30 30 30 30 40 62 |.59051E-|100000@b|
|00000140| 6c 61 63 6b 2e 77 65 65 | 67 2e 75 69 6f 77 61 2e |lack.wee|g.uiowa.|
|00000150| 65 64 75 3e 0a 52 65 66 | 65 72 65 6e 63 65 73 3a |edu>.Ref|erences:|
|00000160| 20 3c 34 64 62 6f 67 6b | 24 37 36 33 40 6a 75 70 | <4dbogk|$763@jup|
|00000170| 69 74 65 72 2e 70 6c 61 | 6e 65 74 2e 6e 65 74 3e |iter.pla|net.net>|
|00000180| 0a 4e 4e 54 50 2d 50 6f | 73 74 69 6e 67 2d 48 6f |.NNTP-Po|sting-Ho|
|00000190| 73 74 3a 20 62 6c 61 63 | 6b 2e 77 65 65 67 2e 75 |st: blac|k.weeg.u|
|000001a0| 69 6f 77 61 2e 65 64 75 | 0a 4d 69 6d 65 2d 56 65 |iowa.edu|.Mime-Ve|
|000001b0| 72 73 69 6f 6e 3a 20 31 | 2e 30 0a 43 6f 6e 74 65 |rsion: 1|.0.Conte|
|000001c0| 6e 74 2d 54 79 70 65 3a | 20 54 45 58 54 2f 50 4c |nt-Type:| TEXT/PL|
|000001d0| 41 49 4e 3b 20 63 68 61 | 72 73 65 74 3d 55 53 2d |AIN; cha|rset=US-|
|000001e0| 41 53 43 49 49 0a 58 2d | 53 65 6e 64 65 72 3a 20 |ASCII.X-|Sender: |
|000001f0| 72 6f 62 69 6e 73 6f 6e | 40 62 6c 61 63 6b 2e 77 |robinson|@black.w|
|00000200| 65 65 67 2e 75 69 6f 77 | 61 2e 65 64 75 0a 49 6e |eeg.uiow|a.edu.In|
|00000210| 2d 52 65 70 6c 79 2d 54 | 6f 3a 20 3c 34 64 62 6f |-Reply-T|o: <4dbo|
|00000220| 67 6b 24 37 36 33 40 6a | 75 70 69 74 65 72 2e 70 |gk$763@j|upiter.p|
|00000230| 6c 61 6e 65 74 2e 6e 65 | 74 3e 20 0a 0a 4f 6e 20 |lanet.ne|t> ..On |
|00000240| 31 34 20 4a 61 6e 20 31 | 39 39 36 2c 20 43 68 72 |14 Jan 1|996, Chr|
|00000250| 69 73 20 4b 65 6d 70 20 | 77 72 6f 74 65 3a 0a 0a |is Kemp |wrote:..|
|00000260| 3e 20 49 20 61 6d 20 69 | 6e 70 75 74 74 69 6e 67 |> I am i|nputting|
|00000270| 20 61 20 73 74 72 69 6e | 67 20 66 72 6f 6d 20 74 | a strin|g from t|
|00000280| 68 65 20 6b 65 79 62 6f | 61 72 64 20 66 72 6f 6d |he keybo|ard from|
|00000290| 20 61 20 75 73 65 72 2c | 20 61 6e 64 20 0a 3e 20 | a user,| and .> |
|000002a0| 69 6e 74 65 6e 64 20 74 | 6f 20 75 73 65 20 74 68 |intend t|o use th|
|000002b0| 65 20 61 74 6f 6c 20 6f | 72 20 73 74 72 74 6f 6c |e atol o|r strtol|
|000002c0| 20 66 75 6e 63 74 69 6f | 6e 73 20 74 6f 20 63 6f | functio|ns to co|
|000002d0| 6e 76 65 72 74 20 74 68 | 65 20 0a 3e 20 73 74 72 |nvert th|e .> str|
|000002e0| 69 6e 67 20 74 6f 20 61 | 20 6e 75 6d 62 65 72 2e |ing to a| number.|
|000002f0| 0a 3e 20 0a 3e 20 42 75 | 74 20 66 69 72 73 74 20 |.> .> Bu|t first |
|00000300| 49 20 6d 75 73 74 20 6d | 61 6b 65 20 73 75 72 65 |I must m|ake sure|
|00000310| 20 74 68 65 20 75 73 65 | 72 20 70 72 6f 76 69 64 | the use|r provid|
|00000320| 65 64 20 61 20 6c 65 67 | 69 74 69 6d 61 74 65 20 |ed a leg|itimate |
|00000330| 0a 3e 20 6e 75 6d 62 65 | 72 20 28 6e 6f 74 20 6c |.> numbe|r (not l|
|00000340| 69 6e 65 20 31 32 33 34 | 42 29 2e 0a 0a 20 20 41 |ine 1234|B)... A|
|00000350| 63 74 75 61 6c 6c 79 20 | 69 66 20 79 6f 75 20 75 |ctually |if you u|
|00000360| 73 65 20 73 74 72 74 6f | 6c 28 29 20 79 6f 75 20 |se strto|l() you |
|00000370| 64 6f 6e 27 74 20 6e 65 | 65 64 20 74 6f 20 64 6f |don't ne|ed to do|
|00000380| 20 74 68 61 74 20 66 69 | 72 73 74 2e 20 20 49 66 | that fi|rst. If|
|00000390| 20 79 6f 75 20 0a 70 61 | 73 73 20 69 74 20 22 66 | you .pa|ss it "f|
|000003a0| 6f 6f 31 32 33 22 20 69 | 74 20 77 69 6c 6c 20 72 |oo123" i|t will r|
|000003b0| 65 74 75 72 6e 20 30 20 | 61 6e 64 20 73 65 74 20 |eturn 0 |and set |
|000003c0| 69 74 73 20 73 65 63 6f | 6e 64 20 70 61 72 61 6d |its seco|nd param|
|000003d0| 65 74 65 72 20 74 6f 20 | 70 6f 69 6e 74 20 0a 74 |eter to |point .t|
|000003e0| 6f 20 74 68 65 20 66 69 | 72 73 74 20 75 6e 63 6f |o the fi|rst unco|
|000003f0| 6e 76 65 72 74 61 62 6c | 65 20 63 68 61 72 61 63 |nvertabl|e charac|
|00000400| 74 65 72 3a 20 20 27 66 | 27 20 28 61 73 73 75 6d |ter: 'f|' (assum|
|00000410| 69 6e 67 20 61 20 62 61 | 73 65 20 6c 65 73 73 20 |ing a ba|se less |
|00000420| 74 68 61 6e 20 31 36 20 | 0a 3a 29 2e 20 20 54 68 |than 16 |.:). Th|
|00000430| 69 73 20 6d 61 6b 65 73 | 20 69 74 20 75 73 65 66 |is makes| it usef|
|00000440| 75 6c 20 66 6f 72 20 63 | 68 65 63 6b 69 6e 67 20 |ul for c|hecking |
|00000450| 69 6e 70 75 74 2e 0a 0a | 3e 20 49 73 20 74 68 65 |input...|> Is the|
|00000460| 72 65 20 61 20 6c 69 62 | 72 61 72 79 20 66 75 6e |re a lib|rary fun|
|00000470| 63 74 69 6f 6e 20 77 68 | 69 63 68 20 77 69 6c 6c |ction wh|ich will|
|00000480| 20 6d 61 6b 65 20 74 68 | 69 73 20 64 65 74 65 72 | make th|is deter|
|00000490| 6d 69 6e 61 74 69 6f 6e | 20 0a 3e 20 66 6f 72 20 |mination| .> for |
|000004a0| 6d 65 2c 20 6f 72 20 6d | 75 73 74 20 49 20 6d 61 |me, or m|ust I ma|
|000004b0| 6b 65 20 75 70 20 6f 6e | 65 20 6f 66 20 6d 79 20 |ke up on|e of my |
|000004c0| 6f 77 6e 20 77 69 74 68 | 20 73 6f 6d 74 68 69 6e |own with| somthin|
|000004d0| 67 20 6c 69 6b 65 20 0a | 3e 20 73 74 72 74 6f 6b |g like .|> strtok|
|000004e0| 3f 0a 0a 20 20 49 66 20 | 79 6f 75 20 77 61 6e 74 |?.. If |you want|
|000004f0| 20 74 6f 20 64 6f 20 74 | 68 61 74 2c 20 73 65 74 | to do t|hat, set|
|00000500| 74 69 6e 67 20 75 70 20 | 61 20 77 68 69 6c 65 20 |ting up |a while |
|00000510| 6c 6f 6f 70 20 77 69 74 | 68 20 69 73 64 69 67 69 |loop wit|h isdigi|
|00000520| 74 28 29 20 28 6f 72 20 | 0a 79 6f 75 72 20 66 61 |t() (or |.your fa|
|00000530| 76 6f 72 69 74 65 20 66 | 75 6e 63 74 69 6f 6e 20 |vorite f|unction |
|00000540| 66 72 6f 6d 20 3c 63 74 | 79 70 65 2e 68 3e 29 20 |from <ct|ype.h>) |
|00000550| 77 6f 75 6c 64 20 62 65 | 20 6d 75 63 68 20 65 61 |would be| much ea|
|00000560| 73 69 65 72 2c 20 61 73 | 73 75 6d 69 6e 67 20 0a |sier, as|suming .|
|00000570| 79 6f 75 27 72 65 20 69 | 6e 74 65 72 65 73 74 65 |you're i|ntereste|
|00000580| 64 20 69 6e 20 64 65 63 | 69 6d 61 6c 20 28 61 73 |d in dec|imal (as|
|00000590| 20 6f 70 70 6f 73 65 64 | 20 74 6f 20 68 65 78 61 | opposed| to hexa|
|000005a0| 64 65 63 69 6d 61 6c 29 | 20 6e 75 6d 62 65 72 73 |decimal)| numbers|
|000005b0| 2e 0a 0a 2f 2a 2a 4a 61 | 6d 65 73 20 52 6f 62 69 |.../**Ja|mes Robi|
|000005c0| 6e 73 6f 6e 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |nson****|********|
|000005d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 20 20 20 20 20 |********|*** |
|000005e0| 20 20 20 20 20 20 20 0a | 20 20 22 49 66 20 61 20 | .| "If a |
|000005f0| 66 61 74 61 6c 20 65 72 | 72 6f 72 20 6f 63 63 75 |fatal er|ror occu|
|00000600| 72 73 2c 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |rs, the |program |
|00000610| 73 68 6f 75 6c 64 20 6e | 6f 74 20 62 65 20 61 6c |should n|ot be al|
|00000620| 6c 6f 77 65 64 20 74 6f | 20 63 6f 6e 74 69 6e 75 |lowed to| continu|
|00000630| 65 2e 22 0a 20 2d 2d 20 | 4f 72 61 63 6c 65 20 50 |e.". -- |Oracle P|
|00000640| 72 6f 2a 43 20 55 73 65 | 72 27 73 20 47 75 69 64 |ro*C Use|r's Guid|
|00000650| 65 20 20 20 20 20 20 20 | 20 20 2a 2a 2a 2a 2a 2a |e | ******|
|00000660| 2a 2a 2a 2a 2a 2a 2a 6a | 61 6d 65 73 2d 72 6f 62 |*******j|ames-rob|
|00000670| 69 6e 73 6f 6e 40 75 69 | 6f 77 61 2e 65 64 75 2a |inson@ui|owa.edu*|
|00000680| 2a 2f 0a | |*/. | |
+--------+-------------------------+-------------------------+--------+--------+